﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HPIT.RentHouse.DTO;
using HPIT.RentHouse.Common;

namespace HPIT.RentHouse.IService
{
    public interface IServicePermissions:IServiceSupport
    {      
        /// <summary>
        /// 获取权限分页列表
        /// </summary>
        /// <param name="start"></param>
        /// <param name="length"></param>
        /// <param name="name"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<PerissionDTO> GetPageList(int start,int length,string name,ref int count);
        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="perissionDTO"></param>
        /// <returns></returns>
        AjaxResult Add(PerissionDTO perissionDTO);
        /// <summary>
        /// 根据id查询该条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        PerissionDTO Get(long id);
        /// <summary>
        /// 修改权限
        /// </summary>
        /// <param name="perissionDTO"></param>
        /// <returns></returns>
        AjaxResult Update(PerissionDTO perissionDTO);
        /// <summary>
        /// 删除权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AjaxResult Delete(long id);
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        AjaxResult DeleteBatch(List<long> ids);
        /// <summary>
        /// 获取权限Id和权限名称
        /// </summary>
        /// <returns></returns>
        List<PerissionDTO> GetList();
        /// <summary>
        /// 获取用户权限
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<PerissionDTO> GetListByUser(long userId);
    }
}
